import Qt 4.7

ListView
{
    id: list
    anchors.top: parent.tabHeader.bottom;anchors.bottom:parent.bottom
    width: parent.width

//    model: contactNamesModel,set in root context in main
    signal rowDbClicked(string ip,string name)
    Component
    {
        id: contactNamesDelegete
        Rectangle
        {
            width: list.width; height: 30
            TextButton
            {
                id:ipColumn
                text: ip
                width:parent.width/2;height:parent.height
                font { family: "Helvetica"; pixelSize: 16; bold: true }
                anchors
                {
                    left: parent.left
                }
            }
            TextButton
            {
                id:nameColumn
                text: name
                width:parent.width/2;height:parent.height
                font { family: "Helvetica"; pixelSize: 16; bold: true }
                anchors
                {
                    right: parent.right
                }
            }

            MouseArea
            {
                anchors.fill: parent
                onDoubleClicked:rowDbClicked(ipColumn.text,nameColumn.text)
            }
        }
    }

    delegate: contactNamesDelegete

}
